/*
 * Copyright 2023 OpenSPG Authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License
 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 * or implied.
 */

package com.antgroup.openspg.server.infra.dao.mapper;

import com.antgroup.openspg.server.infra.dao.dataobject.ConfigDO;
import java.util.List;
import org.apache.ibatis.annotations.Param;

/** @version ConfigMapper.java, v 0.1 2023年07月10日 下午5:46 */
public interface ConfigMapper {
  /**
   * This method was generated by MyBatis Generator. This method corresponds to the database table
   * kg_config
   *
   * @param record com.alipay.kgmng.common.dal.mybatis.po.KgConfigPO
   * @return int
   */
  int insert(ConfigDO record);

  /**
   * This method was generated by MyBatis Generator. This method corresponds to the database table
   * kg_config
   *
   * @param id java.lang.Long
   * @return int
   */
  int deleteByPrimaryKey(Long id);

  /**
   * This method was generated by MyBatis Generator. This method corresponds to the database table
   * kg_config
   *
   * @param ids List<Long>
   * @return int
   */
  int deleteByIds(@Param("ids") List<Long> ids);

  /**
   * This method was generated by MyBatis Generator. This method corresponds to the database table
   * kg_config
   *
   * @param record com.alipay.kgmng.common.dal.mybatis.po.KgConfigPO
   * @return int
   */
  int updateByPrimaryKeySelective(ConfigDO record);

  /**
   * This method was generated by MyBatis Generator. This method corresponds to the database table
   * kg_config
   *
   * @param id java.lang.Long
   * @return com.alipay.kgmng.common.dal.mybatis.po.KgConfigPO
   */
  ConfigDO selectByPrimaryKey(Long id);

  /**
   * This method was generated by MyBatis Generator. This method corresponds to the database table
   * kg_config
   *
   * @param record com.alipay.kgmng.common.dal.mybatis.po.KgConfigPO
   * @param start int
   * @param size int
   * @return List<KgConfigPO>
   */
  List<ConfigDO> selectByCondition(
      @Param("record") ConfigDO record,
      @Param("keyword") String keyword,
      @Param("exclude") List<String> excludeType,
      @Param("start") int start,
      @Param("size") int size);

  /**
   * This method was generated by MyBatis Generator. This method corresponds to the database table
   * kg_config
   *
   * @param record com.alipay.kgmng.common.dal.mybatis.po.KgConfigPO
   * @return int
   */
  int selectCountByCondition(
      @Param("record") ConfigDO record,
      @Param("keyword") String keyword,
      @Param("exclude") List<String> excludeType);

  /**
   * This method was generated by MyBatis Generator. This method corresponds to the database table
   * kg_config
   *
   * @param ids List<Long>
   * @return List<KgConfigPO>
   */
  List<ConfigDO> selectByIds(@Param("ids") List<Long> ids);

  /**
   * select by configId and version
   *
   * @param configId
   * @param version
   * @return
   */
  ConfigDO selectByConfigIdAndVersion(
      @Param("configId") String configId, @Param("version") String version);
}
